<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ page import="com.msmall.base.util.ConstantDB" language="java"%>
<c:set var="AVALIABLE" value="<%=ConstantDB.AVALIABLE%>"></c:set>
<c:set var="UNAVALIABLE" value="<%=ConstantDB.UNAVALIABLE%>"></c:set>
<c:set var="KEYWORD_TYPES_LETTER" value="<%=ConstantDB.KEYWORD_TYPES_LETTER%>"></c:set>
<c:set var="KEYWORD_TYPES_IMAGE" value="<%=ConstantDB.KEYWORD_TYPES_IMAGE%>"></c:set>

<c:set var="KEYWORD_TYPE_SITE_INDEX_WIKI_MOTHER" value="<%=ConstantDB.KEYWORD_TYPE_SITE_INDEX_WIKI_MOTHER%>"></c:set>
<c:set var="KEYWORD_TYPE_SITE_INDEX_WIKI_BABY" value="<%=ConstantDB.KEYWORD_TYPE_SITE_INDEX_WIKI_BABY%>"></c:set>
<c:set var="KEYWORD_TYPE_SITE_WIKI_MOTHER_BABY" value="<%=ConstantDB.KEYWORD_TYPE_SITE_WIKI_MOTHER_BABY%>"></c:set>

<c:set var="KEYWORD_TYPE_COOKBOOK_MOTHER" value="<%=ConstantDB.KEYWORD_TYPE_COOKBOOK_MOTHER%>"></c:set>
<c:set var="KEYWORD_TYPE_COOKBOOK_BABY" value="<%=ConstantDB.KEYWORD_TYPE_COOKBOOK_BABY%>"></c:set>
<c:set var="KEYWORD_TYPE_COOKBOOK_MOTHER_BABY" value="<%=ConstantDB.KEYWORD_TYPE_COOKBOOK_MOTHER_BABY%>"></c:set>

<c:set var="KEYWORD_TYPE_SITE_INDEX_TOP" value="<%=ConstantDB.KEYWORD_TYPE_SITE_INDEX_TOP%>"></c:set>

创建用于页面部分显示某些关键字，其在页面上将创建&gt;a class="XX" target="_blank" href=""..<br/>
<div>
	<form id="f_keyword" action="<c:url value='/admin/keyword/save.do'/>" method="post" enctype="multipart/form-data">
		<input type="hidden" name="keyword.keywordid" value="${keyword.keywordid}">
		<table id="t_keyword_detail">
			<tr>
				<th width="75px">类型</th>
				<td>
					<select name="keyword.types">
						<option value="${KEYWORD_TYPES_LETTER}" <c:if test="${keyword.types == KEYWORD_TYPES_LETTER}">selected="selected"</c:if>>文字</option>
						<option value="${KEYWORD_TYPES_IMAGE}" <c:if test="${keyword.types == KEYWORD_TYPES_IMAGE}">selected="selected"</c:if>>图片</option>
					</select>
				</td>
			</tr>
			<tr>
				<th width="75px">版块</th>
				<td>
					<select name="keyword.module">
						<option value="${KEYWORD_TYPE_SITE_INDEX_WIKI_MOTHER}" <c:if test="${keyword.module == KEYWORD_TYPE_SITE_INDEX_WIKI_MOTHER}">selected="selected"</c:if>>整站首页妈妈字典关键字</option>
						<option value="${KEYWORD_TYPE_SITE_INDEX_WIKI_BABY}" <c:if test="${keyword.module == KEYWORD_TYPE_SITE_INDEX_WIKI_BABY}">selected="selected"</c:if>>整站首页宝宝字典关键字</option>
						<option value="${KEYWORD_TYPE_SITE_WIKI_MOTHER_BABY}" <c:if test="${keyword.module == KEYWORD_TYPE_SITE_WIKI_MOTHER_BABY}">selected="selected"</c:if>>妈妈和宝宝字典关键字混合</option>
						
						<option value="${KEYWORD_TYPE_COOKBOOK_MOTHER}" <c:if test="${keyword.module == KEYWORD_TYPE_COOKBOOK_MOTHER}">selected="selected"</c:if>>妈妈的食谱关键字</option>
						<option value="${KEYWORD_TYPE_COOKBOOK_BABY}" <c:if test="${keyword.module == KEYWORD_TYPE_COOKBOOK_BABY}">selected="selected"</c:if>>宝宝的食谱关键字</option>
						<option value="${KEYWORD_TYPE_COOKBOOK_MOTHER_BABY}" <c:if test="${keyword.module == KEYWORD_TYPE_COOKBOOK_MOTHER_BABY}">selected="selected"</c:if>>妈妈和宝宝食谱关键字混合</option>
						
						<option value="${KEYWORD_TYPE_SITE_INDEX_TOP}" <c:if test="${keyword.module == KEYWORD_TYPE_SITE_INDEX_TOP}">selected="selected"</c:if>>整站首页TOP下的关键字</option>
					</select>
				</td>
			</tr>
			<tr>
			<th width="75px">关键字</th>
				<td>
					<input type="text" name="keyword.name" value="${keyword.name}"/>
				</td>
			</tr>
			<tr>
			<th width="75px">样式(只能适合 a)</th>
				<td>
					<input type="text" name="keyword.style" value="${keyword.style}"/>
				</td>
			</tr>
			<tr>
				<th width="75px">链接地址</th>
				<td>
					<input type="text" name="keyword.keywordUrl" value="${keyword.keywordUrl}"/>
				</td>
			</tr>
			<tr>
			<th width="75px">链接图片</th>
				<td>
					<input type="file" name="image" />
				</td>
			</tr>
			<tr>
			<th width="75px">当前声明图片</th>
				<td>
					<input type="text" name="keyword.htmlImage" value="${keyword.htmlImage}" />
					<br/>
					<img alt="xx" src="${ctx}/${keyword.htmlImage}"/>
				</td>
			</tr>
			<tr>
				<th width="75px">排序</th>
				<td>
					<input type="text" name="keyword.orders" value="${keyword.orders}"/>
				</td>
			</tr>
			<tr>
			<th width="75px">是否可用</th>
				<td>
					<select name="keyword.enabled">
						<option value="${AVALIABLE}" <c:if test="${keyword.enabled == AVALIABLE}">selected="selected"</c:if>><fmt:message key="common.enabled"/></option>
						<option value="${UNAVALIABLE}" <c:if test="${keyword.enabled == UNAVALIABLE}">selected="selected"</c:if>><fmt:message key="common.notenabled"/></option>
					</select>
				</td>
			</tr>
			<tr>
				<th width="75px">描述</th>
				<td>
					<textarea id="keyword_description" name="keyword.description" rows="20" cols="50"><c:out value='${keyword.description}'/></textarea>
				</td>
			</tr>
			<tr>
				<td><input type="submit" name="保存" value="保存"/></td>
			</tr>
		</table>
	</form>
</div>
